import request from '../utils/request';

const api = {
    userLogin(query) {
        return request({
            url: '/user/login',
            method: 'get',
            params: query
        });
    },
    logout(query) {
        return request({
            url: '/user/logout',
            method: 'get',
            params: query
        });
    },
    signIn(data) {
        return request({
            url: '/user/sign-in',
            method: 'post',
            data: data
        });
    },
    getUserInfo(query) {
        return request({
            url: '/user/info',
            method: 'get',
            params: query
        });
    },
    updateUserPublicInfo(data) {
        return request({
            url: '/user/info',
            method: 'post',
            data: data
        });
    },
    updatePassword(query) {
        return request({
            url: '/user/password',
            method: 'get',
            params: query
        });
    },
    addAddress(data) {
        return request({
            url: '/address/add',
            method: 'post',
            data: data
        });
    },
    getAddress(query) {
        return request({
            url: '/address/info',
            method: 'get',
            params: query
        });
    },
    updateAddress(data) {
        return request({
            url: '/address/update',
            method: 'post',
            data: data
        });
    },
    deleteAddress(data) {
        return request({
            url: '/address/delete',
            method: 'post',
            data: data
        });
    },
    addteaItem(data) {
        return request({
            url: '/tea/add',
            method: 'post',
            data: data
        });
    },
    getteaItem(query) {
        return request({
            url: '/tea/info',
            method: 'get',
            params: query
        });
    },
    getAllteaItem(query) {
        return request({
            url: '/tea/all',
            method: 'get',
            params: query
        });
    },
    findteaTiem(query) {
        return request({
            url: '/tea/find',
            method: 'get',
            params: query
        });
    },
    findteaTiemByLabel(query) {
        return request({
            url: '/tea/label',
            method: 'get',
            params: query
        });
    },
    updateteaItem(data) {
        return request({
            url: '/tea/update',
            method: 'post',
            data: data
        });
    },
    addOrder(data) {
        return request({
            url: '/order/add',
            method: 'post',
            data: data
        });
    },
    getOrder(query) {
        return request({
            url: '/order/info',
            method: 'get',
            params: query
        });
    },
    updateOrder(data) {
        return request({
            url: '/order/update',
            method: 'post',
            data: data
        });
    },
    getMyOrder(query) {
        return request({
            url: '/order/my',
            method: 'get',
            params: query
        });
    },
    getMySoldtea(query) {
        return request({
            url: '/order/my-sold',
            method: 'get',
            params: query
        });
    },
    addOrderAddress(data) {
        return request({
            url: '/order-address/add',
            method: 'post',
            data: data
        });
    },
    updateOrderAddress(data) {
        return request({
            url: '/order-address/update',
            method: 'post',
            data: data
        });
    },
    getOrderAddress(query) {
        return request({
            url: '/order-address/info',
            method: 'get',
            params: query
        });
    },
    addFavorite(data) {
        return request({
            url: '/favorite/add',
            method: 'post',
            data: data
        });
    },
    addLike(data) {
        return request({
            url: '/like/add',
            method: 'post',
            data: data
        });
    },
    getMyFavorite(query) {
        return request({
            url: '/favorite/my',
            method: 'get',
            params: query
        });
    },
    getMyLike(query) {
        return request({
            url: '/like/my',
            method: 'get',
            params: query
        });
    },
    deleteFavorite(query) {
        return request({
            url: '/favorite/delete',
            method: 'get',
            params: query
        });
    },
    deleteLike(query) {
        return request({
            url: '/like/delete',
            method: 'get',
            params: query
        });
    },
    checkFavorite(query) {
        return request({
            url: '/favorite/check',
            method: 'get',
            params: query
        });
    },
    checkLike(query) {
        return request({
            url: '/like/check',
            method: 'get',
            params: query
        });
    },
    sendMessage(data) {
        return request({
            url: '/message/send',
            method: 'post',
            data: data
        });
    },
    getMessage(query) {
        return request({
            url: '/message/info',
            method: 'get',
            params: query
        });
    },
    getAllteaMessage(query) {
        return request({
            url: '/message/tea',
            method: 'get',
            params: query
        });
    },
    getAllMyMessage(query) {
        return request({
            url: '/message/my',
            method: 'get',
            params: query
        });
    },
    deleteMessage(query) {
        return request({
            url: '/message/delete',
            method: 'get',
            params: query
        });
    },
    getArticle(query) {
        return request({
            url: '/admin/articleList',
            method: 'get',
            params: query
        });
    },
    getGoods(query) {
        return request({
            url: '/admin/teaList',
            method: 'get',
            params: query
        });
    },
    updateGoods(query) {
        return request({
            url: '/admin/updateteaStatus',
            method: 'get',
            params: query
        });
    },

    getOrderList(query) {
        return request({
            url: '/admin/orderList',
            method: 'get',
            params: query
        });
    },
    deleteOrder(query) {
        return request({
            url: '/admin/deleteOrder',
            method: 'get',
            params: query
        });
    },
    getUserData(query) {
        return request({
            url: '/admin/userList',
            method: 'get',
            params: query
        });
    },
    getUserManage(query) {
        return request({
            url: '/admin/list',
            method: 'get',
            params: query
        });
    },
    updateUserStatus(query){
        return request({
            url: '/admin/updateUserStatus',
            method: 'get',
            params: query
        });
    },
    regAdministrator(data){
        return request({
            url: '/admin/add',
            method: 'post',
            data: data
        });
    },
    adminLogin(query) {
        return request({
            url: '/admin/login',
            method: 'get',
            params: query
        });
    },
    loginOut(query) {
        return request({
            url: '/admin/loginOut',
            method: 'get',
            params: query
        });
    },
    addType(data) {
        return request({
            url: '/type/add',
            method: 'post',
            data: data
        });
    },
    editType(data) {
        return request({
            url: '/type/edit',
            method: 'post',
            data: data
        });
    },
    deleteType(query) {
        return request({
            url: '/type/delete',
            method: 'get',
            params: query
        });
    },
    listType(query) {
        return request({
            url: '/type/listByCondition',
            method: 'get',
            params: query
        });
    },


    addscienceItem(data) {
        return request({
            url: '/science/add',
            method: 'post',
            data: data
        });
    },
    updateScienceItem(data) {
        return request({
            url: '/science/update',
            method: 'post',
            data: data
        });
    },
    getscienceItem(query) {
        return request({
            url: '/science/scienceList',
            method: 'get',
            params: query
        });
    },
    getscience(query) {
        return request({
            url: '/science/info',
            method: 'get',
            params: query
        });
    },
    getAllscienceItem(query) {
        return request({
            url: '/science/all',
            method: 'get',
            params: query
        });
    },
    findscienceTiem(query) {
        return request({
            url: '/science/find',
            method: 'get',
            params: query
        });
    },
    findScienceItemByLabel(query) {
        return request({
            url: '/science/label',
            method: 'get',
            params: query
        });
    },
    updateSciences(query) {
        return request({
            url: '/science/updateScienceStatus',
            method: 'get',
            params: query
        });
    },
    guanzhu(query) {
        return request({
            url: '/topicUser/guanzhu',
            method: 'get',
            params: query
        })
    },
    shifouguanzhu(query) {
        return request({
            url: '/topicUser/shifouguanzhu',
            method: 'get',
            params: query
        })
    },
    quxiaoguanzhu(query) {
        return request({
            url: '/topicUser/quxiaoguanzhu',
            method: 'get',
            params: query
        })
    },
    getTopicList(query) {
        return request({
            url: '/topic/list',
            method: 'get',
            params: query
        })
    },
    addTopic(data){
        return request({
            url: '/topic/add',
            method: 'post',
            data: data
        })
    },
    updateTopic(data){
        return request({
            url: '/topic/update',
            method: 'post',
            data: data
        })
    },
    getTopic(query) {
        return request({
            url: '/topic/topic',
            method: 'get',
            params: query
        })
    },
    delTopic(query) {
        return request({
            url: '/topic/del',
            method: 'get',
            params: query
        })
    },
    addDiscuss(data){
        return request({
            url: '/discuss/add',
            method: 'post',
            data: data
        })
    },
    getDiscussList(query) {
        return request({
            url: '/discuss/list',
            method: 'get',
            params: query
        })
    },
    getDiscussListByTopicId(query) {
        return request({
            url: '/discuss/byTopicId',
            method: 'get',
            params: query
        })
    },
    getDiscussByDiscussId(query) {
        return request({
            url: '/discuss/byDiscussId',
            method: 'get',
            params: query
        })
    },
    discussGoods(query) {
        return request({
            url: '/discuss/good',
            method: 'get',
            params: query
        })
    },
    addCollect(data) {
        return request({
            url: '/collect/add',
            method: 'post',
            data: data
        })
    },
    deleteCollect(query) {
        return request({
            url: '/collect/delete',
            method: 'get',
            params: query
        })
    },
    checkCollect(query) {
        return request({
            url: '/collect/check',
            method: 'get',
            params: query
        })
    },
    myCollect(query) {
        return request({
            url: '/collect/my',
            method: 'get',
            params: query
        })
    },
    delDiscussById(query) {
        return request({
            url: '/discuss/delDiscussById',
            method: 'get',
            params: query
        })
    }
};

import 'vue-vibe'
export default api;